package org.grayrabbit.cms.plugin;

import java.util.Date;
import java.util.List;

/**
 * @author sys53
 * @version 1.0
 * @created 06-一月-2012 15:58:26
 */
public interface Plugin extends Resourced {

	public void close();

	public String getI18nNameKey();

	public String getKey();

	public String getName();

	public boolean isDeleteable();

	public boolean isEnabled();
	
	public boolean isDefaultEnabled();

	public boolean isSystemPlugin();

	public boolean isUninstallable();

	/**
	 * 
	 * @param enabled
	 */
	public void setEnabled(boolean enabled);

	/**
	 * 
	 * @param i18nNameKey
	 */
	public void setI18nNameKey(String i18nNameKey);

	/**
	 * 
	 * @param key
	 */
	public void setKey(String key);

	/**
	 * 
	 * @param name
	 */
	public void setName(String name);

	public void setPluginInformation(PluginInformation createPluginInformation);

	public Class<?> loadClass(String clazz,	Class<?> clzz);

	public void setResources(Resources fromXml);
	
	public void setInstaller(Class<?> installer);

	public void addPluginPermission(PluginPermission p3);
	
	public Class<?> getInstaller();
	
	public List<PluginPermission> getPermissions();

	public void setSystemPlugin(boolean b);

	public void addWebMenuItem(PluginWebMenuItem createWebItem);
	
	public List<PluginWebMenuItem> getPluginWebMenuItems();

	public PluginInformation getPluginInformation();

	public ModuleDescriptor getModuleDescriptor(String moduleKey);
	public void addModuleDescriptor(ModuleDescriptor moduleDescriptor);
	public Date getDateLoaded();

}